
<style lang="scss" scoped>
#pay {
  box-sizing: border-box;
  min-height: 100%;
  margin-top: 70px;
}

#pay .suc > img {
  width: 104px;
  height: 104px;
  display: block;
  margin-bottom: 12px;
}

#pay > .suc > span {
  font-size: 14px;
  margin-bottom: 12px;
}

#pay > .suc > font {
  font-size: 12px;
  color: rgba(160, 154, 155, 1);
  margin-bottom: 30px;
}


.error img {
  width: 66px;
  height: 66px;
  display: block;
  margin-bottom: 12px;
}

.error > span {
  font-size: 14px;
  color: rgba(255, 137, 156, 1);
  margin-bottom: 10px;
}

.error > p,
.error > font {
  font-size: 12px;
  margin-bottom: 5px;
  color: rgba(160, 154, 155, 1);
}
.error > .p-btn {
  margin-top: 30px;
}
.btn {
  width: 85px;
  height: 33px;
  line-height: 33px;
  text-align: center;
  font-size: 13px;
  border: 1px solid rgba(255,137,156,1);
  background: #fff;
  color: #FF899C;
  outline: none;
  border-radius: 2px;
  
}
.btn-box {
  margin-top: 5px;
}
</style>

<template>
  <div class="withdrawal">
    <ComHeader title="支付结果" leftArrow="true"/>
    <div id="pay">
        <div class="suc flex-display flex-display-column flex-center-align " id="sucbox" v-if="payResult">
            <img src="static/ethel_img/shop/pay_img_succeed@2x.png" />
            <span>支付成功</span>
            <font>您已经完成支付</font>
        </div>
        <div class="error flex-display flex-display-column flex-center-align " id="errorBox" v-else>
            <img src="static/ethel_img/shop/pay_img_failure@2x.png" />
            <span>支付失败</span>
            <p>请在<span class="theme-color">15分钟</span>内完成付款</p>
            <font>否则订单会被系统取消</font>
        </div>
        <!--按钮-->
        <div class="btn-box flex-display flex-center-align flex-center-pack">
          <button class="btn" @click="fnOpenOrder">查看订单</button>
        </div>
    </div>
  </div>
</template>
<script>
import api from "@/fetch/api";
import ComHeader from "@/common/ComHeader";
import Scroll from "@/base/scroll/scroll";
import Loading from "@/base/loading/loading";
import axios from "axios";
export default {
  data() {
    return {
      isHasMore: true, // 是否需要上拉加载
      drawalList: [], // 列表数据
      isPullup: true, // 是否需要监听下拉加载
      previous: null, // 是否还有下一页
      page: 1, // 页码
      limit: 10, // 条数
      payResult: this.$route.query.result
    };
  },
  created() {
    // 获取数据
    //this.getTxRecord();
  },
  methods: {
    /**
     * @desc 跳转到订单
     */
    fnOpenOrder() {
      this.$router.replace({
        path: 'NewOrder',
        query: {
          status: 'all'
        }
      })
    },

    /**
     * @desc 是否需要下拉加载
     */
    searchMore() {
      if (this.previous) {
        this.page++;
        this.getTxRecord(true);
      }
    }
  },
  components: {
    Scroll,
    ComHeader,
    Loading
  }
};
</script>



